﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;

namespace easteradventure.World
{
  class Screen
  {
      /* 32x32 tiles, 20x15 arrangement of tiles = 640x480 */
      public const int TILE_WIDTH = 64;
      public const int TILE_HEIGHT = 64;

      private Screen left, right, up, down;

      private TileType[,] tiles;

      public Screen(Texture2D[,] tileImages)
      {
          TileType[,] tiles = new TileType[tileImages.GetLength(0), tileImages.GetLength(1)];
          for (int i = 0; i < tileImages.GetLength(0); i++)
          {
              for (int j = 0; j < tileImages.GetLength(1); j++)
              {
                  tiles[i, j] = new TileType(tileImages[i, j], true);
              }
          }

          this.tiles = tiles;
      }

      public Screen(TileType[,] tiles)
      {
          this.tiles = tiles;
      }

      public int getWidth()
      {
          return tiles.GetLength(0);
          
      }

      public int getHeight()
      {
          return tiles.GetLength(1);
      }

      public TileType getTile(int x, int y)
      {
          return tiles[x, y];
      }
  }
}
